*!version 6.0  2014-10-14

capture program drop rdbwselect_2014_kconst
program define rdbwselect_2014_kconst, eclass
	syntax anything
	
	tokenize "`anything'"
	local p1  `1'
	local p2  `2'
	local kid `3'
	
	
 if (`kid'==1) {
 if (`p1'==0){
 if (`p2'==0) {
 local C1=0.333333333333333
 local C2=1.33333333333333
 }
 }
 if (`p1'==1){
 if (`p2'==0) {
 local C1=-0.1
 local C2=4.8
 }
 if (`p2'==1) {
 local C1=0.8
 local C2=19.2
 }
 }
 if (`p1'==2){
 if (`p2'==0) {
 local C1=0.0285714285714287
 local C2=10.2857142857143
 }
 if (`p2'==1) {
 local C1=-0.428571428571427
 local C2=274.285714285714
 }
 if (`p2'==2) {
 local C1=1.28571428571428
 local C2=308.571428571429
 }
 }
 if (`p1'==3){
 if (`p2'==0) {
 local C1=-0.00793650793649814
 local C2=17.7777777777783
 }
 if (`p2'==1) {
 local C1=0.190476190476176
 local C2=1600.00000000012
 }
 if (`p2'==2) {
 local C1=-1.00000000000003
 local C2=10080.0000000008
 }
 if (`p2'==3) {
 local C1=1.77777777777777
 local C2=4977.77777777821
 }
 }
 if (`p1'==4){
 if (`p2'==0) {
 local C1=0.00216450216449893
 local C2=27.2727272727347
 }
 if (`p2'==1) {
 local C1=-0.0757575757576774
 local C2=6109.0909090921
 }
 if (`p2'==2) {
 local C1=0.606060606059373
 local C2=115461.818181807
 }
 if (`p2'==3) {
 local C1=-1.81818181818016
 local C2=293236.363636312
 }
 if (`p2'==4) {
 local C1=2.27272727272634
 local C2=80181.8181817951
 }
 }
 if (`p1'==5){
 if (`p2'==0) {
 local C1=-0.000582750584072755
 local C2=38.7692307691143
 }
 if (`p2'==1) {
 local C1=0.0279720279806952
 local C2=18092.3076921598
 }
 if (`p2'==2) {
 local C1=-0.314685314702729
 local C2=781587.692308313
 }
 if (`p2'==3) {
 local C1=1.39860139862503
 local C2=5582769.23070759
 }
 if (`p2'==4) {
 local C1=-2.88461538463889
 local C2=7463076.92303863
 }
 if (`p2'==5) {
 local C1=2.76923076923777
 local C2=1289619.69231728
 }
 }
 if (`p1'==6){
 if (`p2'==0) {
 local C1=0.000155400158703856
 local C2=52.2666666813375
 }
 if (`p2'==1) {
 local C1=-0.00979020967770339
 local C2=45158.4000232623
 }
 if (`p2'==2) {
 local C1=0.146853146718058
 local C2=3810240.00305634
 }
 if (`p2'==3) {
 local C1=-0.897435898077674
 local C2=59136000.0516687
 }
 if (`p2'==4) {
 local C1=2.69230769423302
 local C2=213444000.281064
 }
 if (`p2'==5) {
 local C1=-4.20000000228174
 local C2=174356582.583545
 }
 if (`p2'==6) {
 local C1=3.266666667565
 local C2=20718297.6275418
 }
 }
 if (`p1'==7){
 if (`p2'==0) {
 local C1=-4.11365348327308e-05
 local C2=67.7647062980167
 }
 if (`p2'==1) {
 local C1=0.00329083788165008
 local C2=99614.1186678147
 }
 if (`p2'==2) {
 local C1=-0.0633484429563396
 local C2=14792696.6380086
 }
 if (`p2'==3) {
 local C1=0.506787375546992
 local C2=430475298.36917
 }
 if (`p2'==4) {
 local C1=-2.05882356315851
 local C2=3264437686.45156
 }
 if (`p2'==5) {
 local C1=4.61176469177008
 local C2=6999904063.30826
 }
 if (`p2'==6) {
 local C1=-5.76470586378127
 local C2=3838978717.71456
 }
 if (`p2'==7) {
 local C1=3.76470587169752
 local C2=332572914.642903
 }
 }
 if (`p1'==8){
 if (`p2'==0) {
 local C1=1.07820976609219e-05
 local C2=85.2631303268003
 }
 if (`p2'==1) {
 local C1=-0.0010711795912357
 local C2=200084.040818939
 }
 if (`p2'==2) {
 local C1=0.0257188626565039
 local C2=48530367.293081
 }
 if (`p2'==3) {
 local C1=-0.260059123858809
 local C2=2403408146.73831
 }
 if (`p2'==4) {
 local C1=1.36532014608383
 local C2=33224189297.6117
 }
 if (`p2'==5) {
 local C1=-4.09596675634384
 local C2=146138075172.791
 }
 if (`p2'==6) {
 local C1=7.2817234992981
 local C2=206092142381.58
 }
 if (`p2'==7) {
 local C1=-7.57894077897072
 local C2=80937582484.7007
 }
 if (`p2'==8) {
 local C1=4.2631561756134
 local C2=5335240470.92272
 }
 }
 if (`p1'==9){
 if (`p2'==0) {
 local C1=-4.34125468018465e-06
 local C2=104.759683619607
 }
 if (`p2'==1) {
 local C1=0.000359364319592714
 local C2=373351.594641908
 }
 if (`p2'==2) {
 local C1=-0.0100117437541485
 local C2=139779902.485658
 }
 if (`p2'==3) {
 local C1=0.123909175395966
 local C2=10992402108.5829
 }
 if (`p2'==4) {
 local C1=-0.812669515609741
 local C2=252479011669.66
 }
 if (`p2'==5) {
 local C1=3.12047624588013
 local C2=1983097707753.03
 }
 if (`p2'==6) {
 local C1=-7.36788511276245
 local C2=5634749358454.49
 }
 if (`p2'==7) {
 local C1=10.8265118598938
 local C2=5601398362056.87
 }
 if (`p2'==8) {
 local C1=-9.64254522323608
 local C2=1650683628680.73
 }
 if (`p2'==9) {
 local C1=4.76183295249939
 local C2=85540403080.8251
 }
 }
 if (`p1'==10){
 if (`p2'==0) {
 local C1=-5.92561264056712e-07
 local C2=126.173458124805
 }
 if (`p2'==1) {
 local C1=2.24271789193153e-05
 local C2=655457.487684009
 }
 if (`p2'==2) {
 local C1=0.00358942896127701
 local C2=362125556.143413
 }
 if (`p2'==3) {
 local C1=-0.057509183883667
 local C2=42895674678.736
 }
 if (`p2'==4) {
 local C1=0.448391914367676
 local C2=1532214531495.65
 }
 if (`p2'==5) {
 local C1=-2.11321067810059
 local C2=19636178554116.5
 }
 if (`p2'==6) {
 local C1=6.33000183105469
 local C2=98056668493842
 }
 if (`p2'==7) {
 local C1=-12.2766418457031
 local C2=193660165481737
 }
 if (`p2'==8) {
 local C1=15.3532409667969
 local C2=142664371644737
 }
 if (`p2'==9) {
 local C1=-11.9469718933105
 local C2=32680235535116.8
 }
 if (`p2'==10) {
 local C1=5.25889778137207
 local C2=1366106680644.88
 }
 }
 }
 if (`kid'==2) {
 if (`p1'==0){
 if (`p2'==0) {
 local C1=0.5
 local C2=1
 }
 }
 if (`p1'==1){
 if (`p2'==0) {
 local C1=-0.166666666666666
 local C2=4
 }
 if (`p2'==1) {
 local C1=0.999999999999999
 local C2=12
 }
 }
 if (`p1'==2){
 if (`p2'==0) {
 local C1=0.0499999999999927
 local C2=8.99999999999989
 }
 if (`p2'==1) {
 local C1=-0.599999999999969
 local C2=191.999999999998
 }
 if (`p2'==2) {
 local C1=1.49999999999998
 local C2=179.999999999997
 }
 }
 if (`p1'==3){
 if (`p2'==0) {
 local C1=-0.0142857142856023
 local C2=15.9999999999967
 }
 if (`p2'==1) {
 local C1=0.285714285713908
 local C2=1199.99999999958
 }
 if (`p2'==2) {
 local C1=-1.28571428571377
 local C2=6479.99999999822
 }
 if (`p2'==3) {
 local C1=1.99999999999972
 local C2=2799.99999999933
 }
 }
 if (`p1'==4){
 if (`p2'==0) {
 local C1=0.00396825396776279
 local C2=24.999999999904
 }
 if (`p2'==1) {
 local C1=-0.119047619048388
 local C2=4799.99999999096
 }
 if (`p2'==2) {
 local C1=0.83333333333394
 local C2=79379.9999999445
 }
 if (`p2'==3) {
 local C1=-2.22222222222626
 local C2=179199.999999687
 }
 if (`p2'==4) {
 local C1=2.50000000000273
 local C2=44099.9999998837
 }
 }
 if (`p1'==5){
 if (`p2'==0) {
 local C1=-0.00108225108795068
 local C2=36.0000000009544
 }
 if (`p2'==1) {
 local C1=0.0454545455922926
 local C2=14700.0000007333
 }
 if (`p2'==2) {
 local C1=-0.454545454842446
 local C2=564480.000082575
 }
 if (`p2'==3) {
 local C1=1.81818181864219
 local C2=3628800.00023153
 }
 if (`p2'==4) {
 local C1=-3.40909090952482
 local C2=4410000.00041152
 }
 if (`p2'==5) {
 local C1=3.00000000013097
 local C2=698544.000095851
 }
 }
 if (`p1'==6){
 if (`p2'==0) {
 local C1=0.000291375558163054
 local C2=49.0000000807229
 }
 if (`p2'==1) {
 local C1=-0.0163170211235411
 local C2=37632.0000808351
 }
 if (`p2'==2) {
 local C1=0.2202797360369
 local C2=2857680.00223594
 }
 if (`p2'==3) {
 local C1=-1.22377624921501
 local C2=40320000.092693
 }
 if (`p2'==4) {
 local C1=3.36538464389741
 local C2=133402500.284745
 }
 if (`p2'==5) {
 local C1=-4.84615386696532
 local C2=100590336.250403
 }
 if (`p2'==6) {
 local C1=3.5000000068685
 local C2=11099088.0082191
 }
 }
 if (`p1'==7){
 if (`p2'==0) {
 local C1=-7.77092654971057e-05
 local C2=64.0000038038176
 }
 if (`p2'==1) {
 local C1=0.0055944790947251
 local C2=84672.0058301801
 }
 if (`p2'==2) {
 local C1=-0.0979024390690029
 local C2=11430721.0463556
 }
 if (`p2'==3) {
 local C1=0.717949407175183
 local C2=304920057.289328
 }
 if (`p2'==4) {
 local C1=-2.69230864942074
 local C2=2134440363.92093
 }
 if (`p2'==5) {
 local C1=5.60000113397837
 local C2=4249942482.73742
 }
 if (`p2'==6) {
 local C1=-6.53333409875631
 local C2=2175421444.25063
 }
 if (`p2'==7) {
 local C1=4.00000020302832
 local C2=176679380.680557
 }
 }
 if (`p1'==8){
 if (`p2'==0) {
 local C1=2.18183413380757e-05
 local C2=81.0000794511867
 }
 if (`p2'==1) {
 local C1=-0.00185953138861805
 local C2=172800.541412919
 }
 if (`p2'==2) {
 local C1=0.0407402217388153
 local C2=38420009.7178256
 }
 if (`p2'==3) {
 local C1=-0.380106568336487
 local C2=1756346185.84028
 }
 if (`p2'==4) {
 local C1=1.85295575857162
 local C2=22545053348.8166
 }
 if (`p2'==5) {
 local C1=-5.1882472038269
 local C2=92554313087.018
 }
 if (`p2'==6) {
 local C1=8.64706671237946
 local C2=122367438459.692
 }
 if (`p2'==7) {
 local C1=-8.47059142589569
 local C2=45230142568.556
 }
 if (`p2'==8) {
 local C1=4.50000092387199
 local C2=2815835708.811
 }
 }
 if (`p1'==9){
 if (`p2'==0) {
 local C1=4.68557118438184e-06
 local C2=100.001152185784
 }
 if (`p2'==1) {
 local C1=0.000529960263520479
 local C2=326698.901377387
 }
 if (`p2'==2) {
 local C1=-0.0157094746828079
 local C2=112913004.163799
 }
 if (`p2'==3) {
 local C1=0.18475353717804
 local C2=8245154393.28242
 }
 if (`p2'==4) {
 local C1=-1.13636112213135
 local C2=176755900163.269
 }
 if (`p2'==5) {
 local C1=4.09473609924316
 local C2=1301601790390.11
 }
 if (`p2'==6) {
 local C1=-9.10118865966797
 local C2=3480802183163.29
 }
 if (`p2'==7) {
 local C1=12.6308746337891
 local C2=3267931174533.81
 }
 if (`p2'==8) {
 local C1=-10.6575126647949
 local C2=912326437703.479
 }
 if (`p2'==9) {
 local C1=4.99992036819458
 local C2=44916975840.9114
 }
 }
 if (`p1'==10){
 if (`p2'==0) {
 local C1=0.000199975620489568
 local C2=120.969780523265
 }
 if (`p2'==1) {
 local C1=-0.0060248076915741
 local C2=580633.742406933
 }
 if (`p2'==2) {
 local C1=0.0271593332290649
 local C2=298292189.248646
 }
 if (`p2'==3) {
 local C1=-0.118029594421387
 local C2=32946394271.3983
 }
 if (`p2'==4) {
 local C1=0.678001403808594
 local C2=1103315909981.8
 }
 if (`p2'==5) {
 local C1=-2.8924560546875
 local C2=13331592042473
 }
 if (`p2'==6) {
 local C1=8.1068115234375
 local C2=62878798430702.7
 }
 if (`p2'==7) {
 local C1=-14.8649291992188
 local C2=117374454020910
 }
 if (`p2'==8) {
 local C1=17.6541748046875
 local C2=82487887927301
 }
 if (`p2'==9) {
 local C1=-13.0838928222656
 local C2=17947030260316.1
 }
 if (`p2'==10) {
 local C1=5.49765396118164
 local C2=715867764128.387
 }
 }
 }
 if (`kid'==3) {
 if (`p1'==0){
 if (`p2'==0) {
 local C1=0.375
 local C2=1.2
 }
 }
 if (`p1'==1){
 if (`p2'==0) {
 local C1=-0.115789473684211
 local C2=4.49798179659677
 }
 if (`p2'==1) {
 local C1=0.842105263157895
 local C2=16.7154728927583
 }
 }
 if (`p1'==2){
 if (`p2'==0) {
 local C1=0.033482142857143
 local C2=9.81646825396846
 }
 if (`p2'==1) {
 local C1=-0.464285714285726
 local C2=246.349206349214
 }
 if (`p2'==2) {
 local C1=1.32812500000002
 local C2=266.631944444454
 }
 }
 if (`p1'==3){
 if (`p2'==0) {
 local C1=-0.00936222792511199
 local C2=17.1423583607642
 }
 if (`p2'==1) {
 local C1=0.2102461743182
 local C2=1465.2713806652
 }
 if (`p2'==2) {
 local C1=-1.05655355954787
 local C2=8911.29621722357
 }
 if (`p2'==3) {
 local C1=1.82035928143731
 local C2=4288.56473226901
 }
 }
 if (`p1'==4){
 if (`p2'==0) {
 local C1=0.00256405887983036
 local C2=26.471726419711
 }
 if (`p2'==1) {
 local C1=-0.0847303620927278
 local C2=5670.24522674757
 }
 if (`p2'==2) {
 local C1=0.651151696880333
 local C2=103766.558129494
 }
 if (`p2'==3) {
 local C1=-1.89587024669527
 local C2=257166.288749527
 }
 if (`p2'==4) {
 local C1=2.31540479760156
 local C2=68979.7265596946
 }
 }
 if (`p1'==5){
 if (`p2'==0) {
 local C1=-0.000692327266378356
 local C2=37.8030101065867
 }
 if (`p2'==1) {
 local C1=0.0315930338813359
 local C2=16958.7194854538
 }
 if (`p2'==2) {
 local C1=-0.342512696563062
 local C2=711237.176273326
 }
 if (`p2'==3) {
 local C1=1.47962261931389
 local C2=4964148.04675615
 }
 if (`p2'==4) {
 local C1=-2.98356568117015
 local C2=6513914.18146154
 }
 if (`p2'==5) {
 local C1=2.8119664051992
 local C2=1108538.27359325
 }
 }
 if (`p1'==6){
 if (`p2'==0) {
 local C1=0.000185013186126071
 local C2=51.1354623094499
 }
 if (`p2'==1) {
 local C1=-0.0111415456649411
 local C2=42649.1227734126
 }
 if (`p2'==2) {
 local C1=0.161503519528196
 local C2=3501503.85604356
 }
 if (`p2'==3) {
 local C1=-0.960724128526635
 local C2=53169992.4514926
 }
 if (`p2'==4) {
 local C1=2.81992441765033
 local C2=188508235.652391
 }
 if (`p2'==5) {
 local C1=-4.32027687039226
 local C2=151705648.524794
 }
 if (`p2'==6) {
 local C1=3.30943989104708
 local C2=17800087.7625795
 }
 }
 if (`p1'==7){
 if (`p2'==0) {
 local C1=-4.90504635308753e-05
 local C2=66.4686791385977
 }
 if (`p2'==1) {
 local C1=0.00376765715918737
 local C2=94641.1544249395
 }
 if (`p2'==2) {
 local C1=-0.0702605819096789
 local C2=13702534.6421256
 }
 if (`p2'==3) {
 local C1=0.547905247658491
 local C2=390598570.447533
 }
 if (`p2'==4) {
 local C1=-2.17951306328177
 local C2=2911582861.44089
 }
 if (`p2'==5) {
 local C1=4.79666758701205
 local C2=6153252223.55684
 }
 if (`p2'==6) {
 local C1=-5.90634610503912
 local C2=3332903726.62978
 }
 if (`p2'==7) {
 local C1=3.80750473635271
 local C2=285633131.714089
 }
 }
 if (`p1'==8){
 if (`p2'==0) {
 local C1=1.28009644413396e-05
 local C2=83.8024160962497
 }
 if (`p2'==1) {
 local C1=-0.0012318922963459
 local C2=191016.021735915
 }
 if (`p2'==2) {
 local C1=0.0287254140712321
 local C2=45250162.0718378
 }
 if (`p2'==3) {
 local C1=-0.283516984432936
 local C2=2197551933.29091
 }
 if (`p2'==4) {
 local C1=1.4586429297924
 local C2=29881663369.7835
 }
 if (`p2'==5) {
 local C1=-4.30135545134544
 local C2=129595889329.345
 }
 if (`p2'==6) {
 local C1=7.53462833166122
 local C2=180547839391.581
 }
 if (`p2'==7) {
 local C1=-7.74197471141815
 local C2=70153904195.6161
 }
 if (`p2'==8) {
 local C1=4.30597522854805
 local C2=4581150539.5851
 }
 }
 if (`p1'==9){
 if (`p2'==0) {
 local C1=-2.56981365964748e-06
 local C2=103.136967120782
 }
 if (`p2'==1) {
 local C1=0.000382994418032467
 local C2=357882.128373971
 }
 if (`p2'==2) {
 local C1=-0.0111749973148108
 local C2=131065694.25377
 }
 if (`p2'==3) {
 local C1=0.136033833026886
 local C2=10117813548.0377
 }
 if (`p2'==4) {
 local C1=-0.875308513641357
 local C2=228745243443.724
 }
 if (`p2'==5) {
 local C1=3.30519819259644
 local C2=1772311718505.28
 }
 if (`p2'==6) {
 local C1=-7.69141054153442
 local C2=4976168741761.24
 }
 if (`p2'==7) {
 local C1=11.1589169502258
 local C2=4895118462920.4
 }
 if (`p2'==8) {
 local C1=-9.82742595672607
 local C2=1429179266718.81
 }
 if (`p2'==9) {
 local C1=4.80476921796799
 local C2=73448661555.592
 }
 }
 if (`p1'==10){
 if (`p2'==0) {
 local C1=0.000106673240225064
 local C2=124.520672499749
 }
 if (`p2'==1) {
 local C1=-0.00113465404137969
 local C2=632044.740476285
 }
 if (`p2'==2) {
 local C1=0.00709155201911926
 local C2=342376453.533928
 }
 if (`p2'==3) {
 local C1=-0.0642940998077393
 local C2=39880130461.1472
 }
 if (`p2'==4) {
 local C1=0.481655120849609
 local C2=1403708230458.23
 }
 if (`p2'==5) {
 local C1=-2.25773620605469
 local C2=17759178822082.7
 }
 if (`p2'==6) {
 local C1=6.68578338623047
 local C2=87680850871448.7
 }
 if (`p2'==7) {
 local C1=-12.7984313964844
 local C2=171433376795336
 }
 if (`p2'==8) {
 local C1=15.8130035400391
 local C2=125143858240646
 }
 if (`p2'==9) {
 local C1=-12.1715126037598
 local C2=28437327354854.3
 }
 if (`p2'==10) {
 local C1=5.30557250976562
 local C2=1179682266812.88
 }
 }
 }

 
 ereturn scalar C1=`C1'
 ereturn scalar C2=`C2'
 
 
 
 end 
 
